class ElectricalApp{
    private String type;
    public ElectricalApp(String type){
        this.type=type;
        System.out.println("父类有参构造方法被调用");
    }
    public String getType(){
        return type;
    }
}
class TV extends ElectricalApp{
    private String brand;
    public TV(String type,String brand){
        super(type);
        this.brand = brand;
        System.out.println("子类有参构造方法被调用");
    }
    public String getBrand(){
        return brand;
    }
}
public class Example04 {
    public static void main(String[] args){
        TV tv = new TV("电视机","黑马");
        System.out.println("此家电是一个" + tv.getType() + "，它的品牌为：" + tv.getBrand());
    }
}

